package ifi.ro.apvs.gui;

import java.awt.Color;
import java.awt.geom.Ellipse2D;
import ifi.ro.apvs.utils.PArrayList;

public class GPoint extends Ellipse2D.Double {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String text;
	private double radius = 30;
	public Color fillColor;
	public Color borderColor;
	public Color lineColor;
	public PArrayList lineTo = null;

	public GPoint(double x, double y, String text) {
		this.x = x - radius;
		this.y = y - radius;

		this.width = radius * 2;
		this.height = radius * 2;
		this.text = text;
		this.fillColor = Color.LIGHT_GRAY;
		this.borderColor = this.lineColor = Color.DARK_GRAY;
		this.lineTo = new PArrayList();
	}

	public double getRadius() {
		return this.radius;
	}

	public void quickColor(Color c) {
		this.fillColor = c;
		for (int i = 0; i < this.lineTo.size(); i++) {
			this.lineTo.setColor(i, c);
		}
	}

	public String getLabel() {
		return text;
	}
}